Image processing including, but not limited to, logarithimic coding in color coordinate systems including systems with a coordinate defined by a square root of a quadratic polynomial in tristimulus values and, possibly, by a sign of a function of one or more of tristimulus values

ABSTRACT

Color is edited using a color representation including digital values B (brightness), e and f such that B=√{square root over (D 2 +E 2 +F 2 )}, e=E/B; f=F/B, where DEF is a linear color coordinate system. Alternatively, color is represented using digital values B, C (chroma) and H (hue), where cos C=D/B and tan H=E/F. Brightness can be changed without a color shift by changing the B coordinate and leaving unchanged the other coordinates e and f or C and H. Other features are also provided. Brightness coding methods are provided to reduced the size of image data for storage and/or network transmission. The coding methods include logarithmic coding. Some embodiments use logarithmic or linear coding depending on the brightness at a particular pixel.

BACKGROUND OF THE INVENTION

The present invention relates to digital representation, processing,storage and transmission of color images. A digital representation of animage can be stored in a storage device (e.g. a computer memory, adigital video recorder, or some other device). Such representation canbe transmitted over a network, and can be used to display the colorimage on a computer monitor, a television screen, a printer, or someother device. The image can be edited using a suitable computer program.A monochromatic image is also a color image (of a single color displayedpossibly at different intensities).

Color is a sensation caused by electromagnetic radiation (light)entering a human eye. The light causing the color sensation is called“color stimulus”. Color depends on the radiant power and spectralcomposition of the color stimulus, but different stimuli can cause thesame color sensation. Therefore, a large number of colors can bereproduced (“matched”) by mixing just three “primary” color stimuli,e.g. a Red, a Blue and a Green. The primary stimuli can be produced bythree “primary” light beams which, when mixed and reflected from anideal diffuse surface, produce a desired color. The color can berepresented by its coordinates, which specify the intensities of theprimary light beams. For example, in linear RGB color coordinatesystems, a color S is represented by coordinates R, G, B which definethe intensities of the respective Red, Green and Blue primary lightbeams needed to match the color S. If P(λ) is the radiance (i.e. theenergy per unit of time per unit wavelength) of a light sourcegenerating the color S, then the RGB coordinates can be computed as:

R=∫ ₀ ^(∞) P(λ) r (λ)dλ  (1)

G=∫ ₀ ^(∞) P(λ) g (λ)dλ

B=∫ ₀ ^(∞) P(λ) b (λ)dλ

where r(λ), g(λ), b(λ) are “color matching functions” (CMF's). For eachfixed wavelength λ, the values r(λ), g(λ), b(λ) are respectively the R,G and B values needed to match color produced by a monochromatic lightof the wavelength λ of a unit radiance. The color matching functions arezero outside of the visible range of the λ values, so the integrationlimits in (1) can be replaced with the limits of the visible range. Theintegrals in (1) can be replaced with sums if the radiance P(λ) isspecified as power at discrete wavelengths. FIG. 1 illustrates the colormatching functions for the 1931 CIE RGB color coordinate system for a 2°field. (CIE stands for “Commission Internationale de l'Eclairage”.) SeeD. Malacara, “Color Vision and Colorimetry: theory and applications”(2002), and Wyszecki & Stiles, “Color Science: concepts and Methods,Quantitative Data and Formulae” (2^(nd) Ed. 2000), both incorporatedherein by reference.

The RGB system of FIG. 1 is called linear because, as shown by equations(1), the R, G, and B values are linear in P(λ). In a linear system, theintensities such as R, G, B are called “tristimulus values”.

As seen from FIG. 1, the function r(λ) can be negative, so the Rcoordinate can be negative. If R is negative, this means that when thecolor S is mixed with |R| units of the Red primary, the resulting colormatches the mixture of G units of the Green primary with B units of theBlue primary.

New linear color coordinate systems can be obtained as non-degeneratelinear transformations of other systems. For example, the 1931 CIE XYZcolor coordinate system for a 2° field is obtained from the CIE RGBsystem of FIG. 1 using the following transformation:

$\begin{matrix}{{\begin{bmatrix}X \\Y \\Z\end{bmatrix} = {A_{{RGB} - {XYZ}}\begin{bmatrix}R \\G \\B\end{bmatrix}}}{{where}\text{:}}} & (2) \\{A_{{RGB} - {XYZ}} = {\frac{1}{0.17697}\begin{bmatrix}0.49 & 0.31 & 0.20 \\0.17697 & 0.81240 & 0.01063 \\0.00 & 0.01 & 0.99\end{bmatrix}}} & (3)\end{matrix}$

This XYZ system does not correspond to real, physical primaries. Thecolor matching functions x(λ), y(λ), z(λ) for this XYZ system are shownin FIG. 2. These color matching functions are defined by the same matrixA_(RGB-XYZ):

$\begin{bmatrix}{\overset{\_}{x}(\lambda)} \\{\overset{\_}{y}(\lambda)} \\{\overset{\_}{z}(\lambda)}\end{bmatrix} = {A_{{RGB} - {XYZ}}\begin{bmatrix}{\overset{\_}{r}(\lambda)} \\{\overset{\_}{g}(\lambda)} \\{\overset{\_}{b}(\lambda)}\end{bmatrix}}$

The tristimulus values X, Y, Z can be computed from the color matchingfunctions in the usual way:

X=∫ ₀ ^(∞) P(λ) x (λ)dλ  (4)

Y=∫ ₀ ^(∞) P(λ) y (λ)dλ

Z=∫ ₀ ^(∞) P(λ) z (λ)dλ

There are also non-linear color coordinate systems. One example is anon-linear sRGB system standardized by International ElectrotechnicalCommission (IEC) as IEC 61966-2-1. The sRGB coordinates can be convertedto the XYZ coordinates (4) or the CIE RGB coordinates (1). Anotherexample is HSB (Hue, Saturation, Brightness). The HSB system is based onsRGB. In the HSB system, the colors can be visualized as points of avertical cylinder. The Hue coordinate is an angle on the cylinder'shorizontal circular cross section. The pure Red color corresponds toHue=0°; the pure Green to Hue=120°; the pure Blue to Hue=240°. Theangles between 0° and 120° correspond to mixtures of the Red and theGreen; the angles between 120° and 240° correspond to mixtures of theGreen and the Blue; the angles between 240° and 360° correspond tomixtures of the Red and the Blue. The radial distance from the centerindicates the color's Saturation, i.e. the amount of White (White meanshere that R=G=B). At the circumference, the Saturation is maximal, whichmeans that the White amount is 0 (this means that at least one of the R,G, and B coordinates is 0). At the center, the Saturation is 0 becausethe center represents the White color (R=G=B). The Brightness ismeasured along the vertical axis of the cylinder, and is defined asmax(R,G,B).

Different color coordinate systems are suitable for different purposes.For example, the sRGB system is convenient for rendering color oncertain types of monitors which automatically convert the sRGBcoordinates into color. The HSB system is convenient for some colorediting operations including brightness adjustments.

Brightness can be thought of as a degree of intensity of a colorstimulus. Brightness corresponds to our sensation of an object being“bright” or “dim”. Brightness has been represented as the Y value of theXYZ system of FIG. 2, or as the maximum of the R, G and B coordinates ofthe sRGB coordinate system.

There is also an xyY coordinate system is defined based on the XYZsystem as follows:

the Y coordinate of the xyY system is the same as the Y coordinate ofthe XYZ system;

x=X/(X+Y+Z);

z=Z/(X+Y+Z).

The values x and z are called chromaticity coordinates. Separaterepresentation of the brightness coordinate and the chromaticitycoordinates is helpful in providing a compact yet faithful imagerepresentation. People are more sensitive to brightness changes (andhence brightness distortion) than changes in hue and saturation.Therefore, one can represent the chromaticity coordinates less preciselybut more compactly (e.g. in a fewer bits) than brightness.

Compact representation is a particular challenge for images with a highdynamic range (the dynamic range is defined as the ratio of the maximumto minimum brightness values, where the minimum brightness is chosen assome positive number). A large range of brightness can be representedcompactly using a logarithmic function. See G. W. Larson, “The LogLuvEncoding for Full Gamut, High Dynamic Range Images”, J. Graphics Tools,vol. 3, no. 1, pages 15-31. This article proposes a LogLuv coordinatesystem with a brightness coordinate L_(e) and chromatic coordinatesu_(e), v_(e) defined as follows:

L _(e)=└256(log₂ Y+64)┘  (5)

u _(e)└410u′┘

v _(e)=└410v′┘

where:

└exp┘ is the floor operator, denoting the largest integer not exceedingthe expression exp;

u′=4x/(−2x+12y+3)

v′=9y/(−2x+12y+3)

x, y, Y are as in the xyY system.

L_(e) can be stored in 16 bits using sign/magnitude representation, andeach of u_(e), v_(e) in 8 bits.

It is desirable to obtain color coordinate systems which facilitatebrightness editing and other types of color editing, and which alsoallow compact representation of images.

SUMMARY

Some embodiments of the present invention provide color representationtechniques using novel color coordinate systems. In some embodiments,one of the coordinates is defined by a square root of a quadraticpolynomial in tristimulus values, e.g. by a value B=√{square root over(T₁ ²+T₂ ²+T₃ ²)} where T₁, T₂, T₃ are tristimulus values, or by thevalue B and the sign of one or more of T₁, T₂, T₃.

In some embodiments, the color coordinate system has the followingcoordinates:

B=√{square root over (T₁ ²+T₂ ²+T₃ ²)}

S ₂ =T ₂ /B

S ₃ =T ₃ /B

In this coordinate system, if the B coordinate is changed, e.g.multiplied by some number k, and S₂ and S₃ are unchanged, the colormodification corresponds to multiplying the tristimulus values by k.Such color modification does not change the chromaticity coordinates

T₁/(T₁+T₂+T₃), T₂/(T₁+T₂+T₃), T₃/(T₁+T₂+T₃).

Therefore, the (B, S₂, S₃) coordinate system facilitates color editingwhen it is desired not to change the chromaticity coordinates (so thatno color shift would occur). Of note, the xyY system also allowschanging only one coordinate Y without changing the chromaticitycoordinates x, y. The xyY system differs from the (B, S₂, S₃) system inthat the Y coordinate is a linear coordinate and is a tristimulus value,while the B coordinate is a non-linear function of tristimulus values(and of the power distribution P(λ)).

Linear transformations of such color coordinate systems can be used toobtain other novel color coordinate systems.

In some embodiments, compact representation of brightness is achievedusing logarithmic coding. Some embodiments use logarithmic or linearcoding depending on the brightness at a particular pixel.

The invention is not limited to the features and advantages describedabove. Other features are described below. The invention is defined bythe appended claims.

BRIEF DESCRIPTION OF THE DRAWINGS

FIGS. 1 and 2 are graphs of color matching functions for prior art colorcoordinate systems.

FIG. 3 illustrates some color coordinate systems according to someembodiments of the present invention.

FIGS. 4 and 5 are flow charts of image processing methods according tosome embodiments of the present invention.

FIG. 6 is a graph illustrating brightness coding according to someembodiments of the present invention.

FIG. 7 shows pixel coordinates used in some embodiments of the presentinvention.

FIGS. 8, 9 show wavelet transform coefficients in some embodiments ofthe present invention.

FIG. 10 is a block diagram of a computer system suitable for someembodiments of the present invention.

DESCRIPTION OF SOME EMBODIMENTS

The embodiments described in this section illustrate but do not limitthe invention. The invention is defined by the appended claims.

Some embodiments of the present invention use color coordinate systemsBEF, Bef and BCH which can be defined, for example, as follows. First, alinear color coordinate system DEF is defined as a linear transformationof the 1931 CIE XYZ color coordinate system of FIG. 2:

$\begin{matrix}{{\begin{bmatrix}D \\E \\F\end{bmatrix} = {A_{{XYZ} - {DEF}}\begin{bmatrix}X \\Y \\Z\end{bmatrix}}}{{where}\text{:}}} & (6) \\{A_{{XYZ} - {DEF}} = \begin{bmatrix}0.205306 & 0.712507 & 0.467031 \\1.853667 & {- 1.279659} & {- 0.442859} \\{- 0.365451} & 1.011998 & {- 0.610425}\end{bmatrix}} & (7)\end{matrix}$

It has been found that for many computations, adequate results areachieved if the elements of matrix A_(XYZ-DEF) are rounded to fourdigits or fewer after the decimal point, i.e. the matrix elements can becomputed with an error Err≦0.00005. Larger errors can also be toleratedin some embodiments. The DEF coordinate system corresponds to colormatching functions d(λ), ē(λ), ƒ(λ) which can be obtained from x(λ),y(λ), z(λ) using the same matrix A_(XYZ-DEF):

$\begin{matrix}{\begin{bmatrix}{\overset{\_}{d}(\lambda)} \\{\overset{\_}{e}(\lambda)} \\{\overset{\_}{f}(\lambda)}\end{bmatrix} = {A_{{XYZ} - {DEF}}\begin{bmatrix}{\overset{\_}{x}(\lambda)} \\{\overset{\_}{y}(\lambda)} \\{\overset{\_}{z}(\lambda)}\end{bmatrix}}} & (8)\end{matrix}$

By definition of the color matching functions and the tristimulusvalues,

D=∫ ₀ ^(∞) P(λ) d (λ)dλ  (9)

E=∫ ₀ ^(∞) P(λ)ē(λ)dλ

F=∫ ₀ ^(∞) p(λ) ƒ(λ)dλ

As explained above, the integration can be performed over the visiblerange only.

As seen in FIG. 2, the color matching functions x(λ), y(λ), z(λ) arenever negative. It follows from equations (4) that the X, Y, Z valuesare never negative. Since the first row of matrix A_(XYZ-DEF) has onlypositive coefficients, the function d(λ) is never negative, and the Dvalue is also never negative.

When D>0 and E=F=0, the color is white or a shade of gray. Such colorscoincide, up to a constant multiple, with the CIE D₆₅ white colorstandard.

If a color is produced by a monochromatic radiation with λ=700 nm (thisis a red color), then F=0 and E>0.

The color matching functions d(λ), ē(λ), ƒ(λ) form an orthonormal systemin the function space L₂ on [0,∞) (or on any interval containing thevisible range of the λ values if the color matching functions are zerooutside of this range), that is:

∫₀ ^(∞) d(λ)ē(λ)dλ=∫₀ ^(∞) d(λ) ƒ(λdλ=∫₀ ^(∞)ē(λ) ƒ(λ)dλ=0   (10)

∫₀ ^(∞)[ d(λ)]² dλ=∫₀ ^(∞)[ē(λ)]² dλ=∫₀ ^(∞)[ ƒ(λ)]² dλ=K

where K is a positive constant defined by the measurement units for thewavelength λ and the radiance P(λ). The units can be chosen so that K=1.

The integrals in (10) can be replaced with sums if the CMF's are definedat discrete λ values, i.e.:

$\begin{matrix}{{{\sum\limits_{\lambda}^{\;}\; {{\overset{\_}{d}(\lambda)}{\overset{\_}{e}(\lambda)}}} = {{\sum\limits_{\lambda}^{\;}\; {{\overset{\_}{d}(\lambda)}{\overset{\_}{f}(\lambda)}}} = {{\sum\limits_{\lambda}^{\;}\; {{\overset{\_}{e}(\lambda)}{\overset{\_}{f}(\lambda)}}} = 0}}}{{\sum\limits_{\lambda}^{\;}\; \left\lbrack {\overset{\_}{d}(\lambda)} \right\rbrack^{2}} = {{\sum\limits_{\lambda}^{\;}\; \left\lbrack {\overset{\_}{e}(\lambda)} \right\rbrack^{2}} = {{\sum\limits_{\lambda}^{\;}\; \left\lbrack {\overset{\_}{f}(\lambda)} \right\rbrack^{2}} = K}}}} & (11)\end{matrix}$

where the sums are taken over a discrete set of the λ values. Theconstant K can be different than in (10). Color matching functions willbe called orthonormal herein if the satisfy the equations (10) or (11).

If S1 and S2 are two colors with DEF coordinates (D1,E1,F1) and(D2,E2,F2), a dot product of these colors can be defined as follows:

<S1,S2>=D1*D2+E1*E2+F1*F2   (12)

Thus, the DEF coordinate system can be thought of as a Cartesiancoordinate system having mutually orthogonal axes D, E, F (FIG. 3), withthe same measurement unit for each of these axes.

The dot product (12) does not depend on the color coordinate system aslong as the color coordinate system is orthonormal in the sense ofequations (10) or (11) and its CMF's are linear combinations of x(λ),y(λ), z(λ) (and hence of d(λ), ē(λ), ƒ(λ)). More particularly, let T₁,T₂, T₃ be tristimulus values in a color coordinate system whose CMF's t₁, t₂ , t₃ belong to a linear span Span( d(λ), ē(λ), ƒ(λ)) and satisfythe conditions (10) or (11). For the case of equations (10), this meansthat:

∫₀ ^(∞) t₁ (λ) t₂ (λ)dλ=∫₀ ^(∞) t₁ (λ t₃ (λ)dλ=∫₀ ^(∞) t₂ (λ) t₃×(λ)dλ=0  (13)

∫₀ ^(∞)[ t₁ (λ)]² dλ=∫₀ ^(∞)[ t₂ (λ)]² dλ=∫₀ ^(∞)[ t₃ (λ)]² dλ=K

with the same constant K as in (10). The discrete case (11) is similar.Suppose the colors S1, S2 have the T₁T₂T₃ coordinates (T_(1.1), T_(2.1),T_(3.1)) and (T_(1.2), T_(2.2), T_(3.2)) respectively. Then the dotproduct (12) is the same as

<S ₁ ,S ₂>=T _(1.1) T _(1.2)+T _(2.1) T _(2.2)+T _(3.1) T _(3.2).

The brightness B of a color S can be represented as the length (thenorm) of the vector S:

B=||S||=√{square root over (<S,S>)}=√{square root over (D²+E²+F²)}  (14)

The BEF color coordinate system is defines each color by the coordinates(B,E,F). The Bef color coordinate system is defined as follows:

B=√{square root over (D²+E²+F²)}  (15)

e=E/B

f=F/B

If B=0 (absolute black color), then e and f can be left undefined or canbe defined in any way, e.g. as zeroes.

Since D is never negative, the D, E, F values can be determined from theB, e, f values as follows:

E=e×B   (16)

F=f×B

D=√{square root over (B²−(e*B)²−(f*B)²)}{square root over(B²−(e*B)²−(f*B)²)}=B√{square root over (1−e ² −f ²)}

The Bef system is convenient for brightness editing because thebrightness can be changed by changing the B coordinate and leaving e andf unchanged. Such editing does not involve a color shift, i.e. thecolor's chromatic perception does not change. See the following U.S.patent applications filed by S. N. Bezryadin and incorporated herein byreference: Ser. No. 11/321,443, filed Dec. 28, 2005; Ser. No.11/322,111, filed Dec. 28, 2005; Ser. No. 11/432,221 filed May 10, 2006;Ser. No. 11/494,393 filed Jul. 26, 2006; Ser. No. 11/377,591 filed Mar.16, 2006; Ser. No. 11/376,837 filed Mar. 16, 2006; and Ser. No.11/377,161 filed Mar. 16, 2006.

Another color coordinate system that facilitates the brightness editingis the spherical coordinate system for the DEF space. This coordinatesystem BCH (Brightness, Chroma, Hue) is defined as follows (see alsoFIG. 3):

B=√{square root over (D²+E²+F²)}  (17)

C (“chroma”) is the angle between the color S and the D axis;

H (“hue”) is the angle between (i) the orthogonal projection S_(EF) ofthe vector S on the EF plane and (ii) the E axis.

The term “chroma” has been used to represent a degree of saturation (seeMalacara's book cited above). Recall that in the HSB system, theSaturation coordinate of a color represents the white amount in thecolor. In the BCH system, the C coordinate of a color is a goodrepresentation of saturation (and hence of chroma) because the Ccoordinate represents how much the color deviates from the white colorD₆₅ represented by the D axis (E=F=0).

The H coordinate of the BCH system represents the angle between theprojection S_(EF) and the red color represented by the E axis, and thusthe H coordinate is a good representation of hue.

Transformation from BCH to DEF can be performed as follows:

D=B×cos C   (18)

E=B×sin C×cos H

F=B×sin C×sin H

Transformation from DEF to BCH can be performed as follows. The Bcoordinate can be computed as in (17). The C and H computations dependon the range of these angles. Any suitable ranges can be chosen. In someembodiments, the angle C is in the range [0,π/2], and hence

C=cos⁻¹(D/B)   (19)

In some embodiments, the angle H can be computed from the relationship:

tan H=F/E   (20)

or

tan H=f/e   (21)

where e and f are the Bef coordinates (15). For example, any of thefollowing relations can be used:

H=tan⁻¹(F/E)+α  (22)

H=tan⁻¹(f/e)+α

where α depends on the range of H. In some embodiments, the angle H ismeasured from the positive direction of the E axis, and is in the rangefrom 0 to 2π or −π to π. In some embodiments, one of the followingcomputations is used:

H=arctg(E,F)   (23)

H=arctg(e,j)

where arctg is computed as shown in pseudocode in Appendix 1 at the endof this section before the claims.

Transformation from BCH to Bef can be performed as follows:

B=B   (24)

e=sin C×cos H

f=sin C×sin H

Transformation from Bef to BCH can be performed as follows:

B=B   (25)

C=cos⁻¹√{square root over (1−e ²−f²)}, or C=sin⁻¹ √{square root over(e²+f²)}

H=tan⁻¹(f/e)+α (see (22)), or H=arctg(e,f) (see Appendix 1).

As with Bef, the BCH system has the property that a change in the Bcoordinate without changing C and H corresponds to multiplying thetristimulus values D, E, F by some constant k.

The invention includes systems and methods for color image editing anddisplay. The Bef and BCH color coordinates can be transmitted in a datacarrier such as a wireless or wired network link, a computer readabledisk, or other types of computer readable media. The invention includescomputer instructions that program a computer system to perform thebrightness editing and color coordinate system conversions. Someembodiments of the invention use hardwired circuitry instead of, ortogether with, software programmable circuitry.

In some embodiments, the Bef or BCH color coordinate system can bereplaced with its linear transforms, e.g. the coordinates (B+e,e,f) or(2B,2 e,2 f) can be used instead of (B,e,f). The angle H can be measuredfrom the E axis or some other position. The angle C can also be measuredfrom some other position. The invention is not limited to the order ofthe coordinates. The invention is not limited to DEF, XYZ, or any othercolor coordinate system as the initial coordinate system. In someembodiments, the orthonormality conditions (10) or (11) are replacedwith quasi-orthonormality conditions, i.e. the equations (10) or (11)hold only approximately. More particularly, CMF's t₁ (λ), t₂ (λ), t₃ (λ)will be called herein quasi-orthonormal with an error at most ε if theysatisfy the following conditions:

-   1. each of ∫₀ ^(∞ t₁ (λ) t 2) (λ)dλ, ∫₀ ^(∞) t₁ (λ) t₃ (λ)dλ, ∫₀    ^(∞) t ₂ (λ) t₃ (λ)dλ is in the interval [−ε,ε], and-   2. each of ∫₀ ^(∞)[t₁(λ)]²dλ, ∫₀ ^(∞)[ t₂ (λ)]²dλ, ∫₀ ^(∞)[ t₃    (λ)]²dλ is in the interval [K−ε,K+ε]for positive constants K and ε.    In some embodiments, ε is 0.3K, or 0.1K, or some other value at most    0.3K, or some other value. Alternatively, the CMF's will be called    quasi-orthonormal with an error at most ε if they satisfy the    following conditions:-   1. each of

${\sum\limits_{\lambda}^{\;}\; {{{\overset{\_}{t}}_{1}(\lambda)}{{\overset{\_}{t}}_{2}(\lambda)}}},{\sum\limits_{\lambda}^{\;}\; {{{\overset{\_}{t}}_{1}(\lambda)}{{\overset{\_}{t}}_{3}(\lambda)}}},{\sum\limits_{\lambda}^{\;}\; {{{\overset{\_}{t}}_{2}(\lambda)}{{\overset{\_}{t}}_{3}(\lambda)}}}$

is in the interval [−ε,ε], and

-   2. each of

${\sum\limits_{\lambda}^{\;}\; \left\lbrack {{\overset{\_}{t}}_{1}(\lambda)} \right\rbrack^{2}},{\sum\limits_{\lambda}^{\;}\; \left\lbrack {{\overset{\_}{t}}_{2}(\lambda)} \right\rbrack^{2}},{\sum\limits_{\lambda}^{\;}\; \left\lbrack {{\overset{\_}{t}}_{3}(\lambda)} \right\rbrack^{2}}$

is in the interval [K−ε,K+ε]for positive constants K and ε. In some embodiments, ε is 0.3K, or 0.1K,or some other value at most 0.3K, or some other value. Orthonormalfunctions are quasi-orthonormal, but the reverse is not always true. Ifε=0.1K, the functions will be called 90%-orthonormal. More generally,the functions will be called n %-orthonormal if ε is (100-n) % of K. Forexample, for 70%-orthonormality, ε=0.3K.

The invention is not limited to the orthonormal or quasi-orthonormalCMF's or to any particular white color representation. For example, insome embodiments, the following color coordinate system (S₁,S₂,S₃) isused for color editing:

S ₁=√{square root over (X ²+Y²+Z²)}  (26)

S ₂ =X/S ₁

S ₃ =Z/S ₁

The XYZ tristimulus values in (26) can be replaced with linear RGBtristimulus values or with some other tristimulus values T₁, T₂, T₃,e.g.:

S ₁=√{square root over (T ₁ ² +T ₂ ² +T ₃ ²)}  (27)

S ₂ =T ₂ /S ₁

S ₃ =T ₃ /S ₁.

If T₁ can be negative, than the sign of T₁ can be provided in additionto the coordinates. Alternatively the sign of T₁ can be incorporatedinto one of the S₁, S₂, and/or S₃ values, for example:

S ₁=Sign(T₁)×√{square root over (T ₁ ² +T ₂ ² +T ₃ ²)}  (28)

The brightness editing can still be performed by multiplying the S₁coordinate by k, with the S₂ and S₃ values being unchanged.

The BCH coordinate system can be constructed from linear systems otherthan DEF, including orthonormal and non-orthonormal, normalized andnon-normalized systems. In some embodiments, a coordinate system is usedwith coordinates (S₁,S₂,S₃), where S₁ is defined as in (27) or (28), andthe coordinates S₂ and S₃ are defined in a way similar to (19)-(23),e.g.:

S ₂=cos⁻¹(T¹ /B)   (29)

S ₃=tan⁻¹(T ₃ /T ₂)+α

where α is as in (22), or

S ₃=arctg(T ₂ ,T ₃)   (30)

In some embodiments, the value B is the square root of some otherquadratic polynomial of in T₁, T₂, T₃:

B=√{square root over (g₁₁ T ₁ ² +g ₂₂ T ₂ ² +g ₃₃ T ₃ ² +g ₁₂ T ₁ T ₂ +g₁₃ T ₁ T ₃ +g ₂₃ T ₂ T ₃)}

wherein g₁₁, g₂₂, g₃₃, g₁₂, g₁₃, g₂₃ are predefined constants, and g₁₁,g₂₂, g₃₃ are not equal to zero (e.g. g₁₁, g₂₂, g₃₃ are positive). Lineartransforms result in different mathematical expressions of thecoordinates without necessarily changing the values of the coordinates.For example, the coordinate system may use coordinates S₁, S₂, S₃ ortheir linear transform, wherein S₁ is defined by the value B, or S₁ isdefined by B and the sign of a predefined function of one or more of T₁,T₂, T₃. In some embodiments

B=√{square root over (α₁ ²(T ₁ ,T ₂ ,T ₃)+α₂ ²(T ₁ ,T ₂ ,T ₃)+α₃ ²(T ₁,T ₂ ,T ₃))}{square root over (α₁ ²(T ₁ ,T ₂ ,T ₃)+α₂ ²(T ₁ ,T ₂ ,T₃)+α₃ ²(T ₁ ,T ₂ ,T ₃))}{square root over (α₁ ²(T ₁ ,T ₂ ,T ₃)+α₂ ²(T ₁,T ₂ ,T ₃)+α₃ ²(T ₁ ,T ₂ ,T ₃))}

wherein

α₁(T ₁ ,T ₂ ,T ₃)=α₁₁ ×T ₁+α₁₂ ×T ₂+α₁₃ ×T ₃

α₂(T ₁ ,T ₂ ,T ₃)=α₂₁ ×T ₁+α₂₂ ×T ₂+α₂₃ ×T ₃

α₃(T ₁ ,T ₂ ,T ₃)=α₃₁ ×T ₁+α₃₂ ×T ₂+α₃₃ ×T ₃

wherein α₁₁, α₁₂, α₁₃, α₂₁, α₂₂, α₂₃, α₃₁, α₃₂, α₃₃ are predefinednumbers such that the following matrix Λ is non-degenerate:

$\Lambda = \begin{bmatrix}\alpha_{11} & \alpha_{12} & \alpha_{13} \\\alpha_{21} & \alpha_{22} & \alpha_{23} \\\alpha_{31} & \alpha_{32} & \alpha_{33}\end{bmatrix}$

In some embodiments, the coordinate S₁ is defined by the value B and bya sign of a predefined function of one or more of T₁, T₂, T₃. Thefunction can be one of α₁(T₁,T₂,T₃), α₂(T₁,T₂,T₃), α₃(T₁,T₂,T₃).Clearly, the values T₁′=α₁(T₁,T₂,T₃), T₂′=α₂(T₁,T₂,T₃), T₃′=α₃(T₁,T₂,T₃)are also tristimulus values. In some embodiments, the coordinate S₂ isdefined by a value β(T₁,T₂,T₃)/B, wherein

β(T₁ ,T ₂ ,T ₃)=β₁ ×T ₁+β₂ ×T ₂+β₃ ×T ₃,

wherein β₁, β₂, β₃ are predefined numbers at least one of which is notequal to zero, or the coordinate S₂ is defined by the valueβ(T₁,T₂,T₃)/B and the sign of a predefined function of one or more ofT₁, T₂, T₃. The coordinate S₃ is defined by a value γ(T₁,T₂,T₃)/B,wherein

γ(T ₁ ,T ₂ ,T ₃)=γ₁ ×T ₁+γ₂ ×T ₂+γ₃ ×T ₃,

wherein γ₁, γ₂, γ₃ are predefined numbers at least one of which is notequal to zero, and γ(T₁,T₂,T₃) is not a multiple of β(T₁,T₂,T₃), or thecoordinate S₃ is defined by the value γ(T₁,T₂,T₃)/B and the sign of apredefined function of one or more of T₁, T₂, T₃. In some embodiments, avalue cos S₂ is defined by a value β(T₁,T₂,T₃)/B, wherein

β(T ₁ ,T ₂ , T ₃)=β₁ ×T ₁+β₂ ×T ₂+β₃ ×T ₃,

wherein β₁, β₂, β₃ are predefined numbers at least one of which is notequal to zero, or the value cos S₂ is defined by the value β(T₁,T₂,T₃)/Band the sign of a predefined function of one or more of T₁, T₂, T₃. Insome embodiments, a value tan S₃ is defined by a valueγ(T₁,T₂,T₃)/δ(T₁,T₂,T₃), wherein

γ(T ₁ ,T ₂ ,T ₃)=γ₁ ×T ₁+γ₂ ×T ₂+γ₃ ×T ₃,

δ(T ₁ ,T ₂ ,T ₃)=δ₁ ×T ₁+δ₂ ×T ₂+δ₃ ×T ₃,

wherein γ₁, γ₂, γ₃ are predefined numbers at least one of which is notequal to zero, and δ₁, δ₂, δ₃ are predefined numbers at least one ofwhich is not equal to zero, or the value tan S₃ is defined by the valueγ(T₁,T₂,T₃)/δ(T₁,T₂,T₃) and the sign of a predefined function of one ormore of T₁, T₂, T₃. In some embodiments, β(T₁,T₂,T₃) is one of α₁(T₁,T₂,T₃), α₂(T₁,T₂,T₃), α₃(T₁,T₂,T₃); (T₁,T₂,T₃) is another one ofα₂(T₁,T₂,T₃), α₃(T₁,T₂,T₃); and δ(T₁,T₂,T₃) is the third one of α₁(T₁,T₂,T₃), α₂(T₁,T₂,T₃). In some embodiments, any color whose tristimulusvalues T₁,T₂,T₃ are such that α₁(T₁,T₂,T₃) is not zero andα₂(T₁,T₂,T₃)=α₃(T₁,T₂,T₃)=0, is a white or a shade of gray. This can beD₆₅ or some other white color. In some embodiments, a monochromatic redcolor of a predefined wavelength has tristimulus values T₁, T₂, T₃ suchthat α₂(T₁, T₂,T₃) is positive and α₃(T₁,T₂,T₃)=0. In some embodiments,α₁(T₁,T₂,T₃), α₂(T₁,T₂,T₃), α₃(T₁,T₂,T₃) are tristimulus valuescorresponding to 70%-orthonormal color matching functions. In someembodiments, up to a constant multiple, Λ is an orthonormal matrix, i.e.ΛΛ=I, where Λ^(T) is a transpose of Λ, and I is the identity matrix,i.e.

$I = \begin{bmatrix}1 & 0 & 0 \\0 & 1 & 0 \\0 & 0 & 1\end{bmatrix}$

We will also call the matrix orthonormal if ΛΛ^(T)=c×I where c is anon-zero number. If the elements of ΛΛ^(T) are each within c×n/100 ofthe respective elements of a matrix c×I for some c and n, then thematrix Λ will be called (100-n)%-orthonormal. For example, if theelements of ΛΛ^(T) are each within 0.×c of the respective elements of amatrix c×I (i.e. for each element λ_(i,j) of matrix ΛΛ^(T),|λ_(i,j)−e_(i,j)|≦0.3×c where e_(i,j) is the corresponding element ofthe matrix c×I), the matrix A will be called 70%-orthonormal. In someembodiments, the matrix Λ is 70% or more percent orthonormal (e.g.90%-orthonormal).

The tristimulus values T₁, T₂, T₃, or the corresponding color matchingfunctions, do not have to be normalized in any way. In some prior artsystems, the color matching functions are normalized to require that theintegral of each color matching function be equal to 1. In the XYZsystem of FIG. 2, there is a normalizing condition X=Y=Z for apre-defined, standard white color with a constant spectral powerdistribution function P(λ). The invention is not limited by any suchrequirements.

Compact Representation of Images

The Bef and BCH coordinate systems are convenient for image editing, butit is desirable to represent the image in a more compact form forstorage or network transmission. Compact representation may involveimage degradation, and it is desirable to reduce or avoid imagedegradation.

In some embodiments, a compact representation is generated as shown inFIG. 4. The Bef data are coded at step 410 using a logarithmic functionin a manner described in more detail below. Then some transform isperformed at step 420 to improve the compression ratio at step 430.Transform examples include decorrelation transforms (e.g. discretewavelet transform, or DWT) that separate low frequency and highfrequency components. Further compression (e.g. run/length, entropycoding, or adaptive dictionary coding) is performed at step 430.Finally, the image is stored and/or transmitted over a network at step440. Not all of these operations are performed in all the embodiments,and additional operations may be performed.

In order to edit or display the image processed by the method of FIG. 4,the sequence is reversed (FIG. 5). The image data are read from storageor received over a network (step 510), then decompressed (step 520) toreverse the operation 430, then an inverse transform is performed (step530) to reverse the operation 420, and finally the Bef data arereconstructed (exponential/linear processing at step 540) to reverse thelogarithmic/linear coding of step 410. (The Bef data may or may not beperfectly reconstructed.) The image is then edited and/or displayed asdesired.

Advantageously, if the steps 420, 430 are lossless, then the only lossof information may occur at step 410. Error control at step 410 istherefore sufficient to control the image degradation.

In some embodiments, the e and f components are represented in integerformat (i.e. fixed point format) at the output of step 410. The integerformat is desirable for decorrelation step 420 because somedecorrelation methods (e.g. DWT) are computationally intensive, andinteger arithmetic is faster than floating point arithmetic on manycomputer processors. Therefore, in some embodiments, the e and fprocessing of step 410 consists in representing the e and f coordinatesin integer format in a desired number of bits. If e, f were in floatingpoint format (i.e. with a separate representation of the exponent andthe mantissa) at the input of step 410, they are converted to thedesired integer format at step 410. If they were in integer format atthe input of step 410, they may be truncated or otherwise processed asneeded to obtain the desired number of bits. The maximum error (maximumΔe or Δf) is then defined by the number of bits in the finalrepresentation (for example, if 12 bits are used, then the maximum erroris ½¹²). The maximum error defines the maximum distortion of the hue andsaturation parameters.

For the brightness, the maximum error ΔB characterizes the maximumbrightness distortion only in dim image areas. Past studies indicatethat human ability to differentiate between different brightness valuesI₁ and I₂ (where I₁ and I₂ are prior representations of brightness) canbe characterized by ΔI=|I₁−I₂| only in dim areas. For brighter areas,including most of the visible brightness range, a good measure of thehuman ability to differentiate between I₁ and I₂ is the value

ΔI/I   (31)

where I is some value in the range [I₁,I₂], e.g. I₁=I₁. (Here eachbrightness value I, I₁, I₂ can represent the brightness average oversome area.) If the value (31) is below 0.5%, people cannot see thedifference between I₁ and I₂, so no image degradation occurs ifbrightness is changed from I₁ to I₂ during image processing. As thevalue (31) increases, more and more people will see the difference. A 2%value of (31) is noticeable to most people.

The B coordinate is a good brightness representation, so the maximumimage degradation can be specified by the maximum ΔB for low B valuesand by the maximum of

ΔB/B   (32)

for higher B values. Therefore, if the maximum error ΔB were constantthroughout the brightness range to achieve low image degradation bothfor low and high brightness values, the parameter (32) would be verysmall for large B, resulting in unnecessary brightness information inthe image and hence in less than optimal data size and more intensivecomputation at steps 420, 430.

In order to obtain a more uniform value (32), some embodiments of thepresent invention perform logarithmic encoding of the B coordinate atstep 410, or a combination of the logarithmic encoding for higher Bvalues and some other encoding (e.g. linear) for lower B values. The Bcoordinate is converted to a value V (FIG. 6), which is represented ininteger format in a desired number of bits in some embodiments. Themaximum error ΔV is defined by the number of bits (plus any errors ofthe logarithm computation), and hence is approximately constant. The Vvalues are chosen so that the maximum error ΔB increases with B, and thevalue (32) remains approximately constant.

More particularly, let V₁, V₂, . . . , V_(N) be all the possible Vvalues allowed at the output of step 410. Suppose, for example, thatV_(n)=n. The maximum error ΔV=1, and hence is constant. Let B₁, B₂, . .. B_(N) be the corresponding B values. Let c_(n)=B_(n+1)/B_(n). In eachinterval [B_(n),B_(n+1)), the value (32) has the following maximum:

(B _(n+1) −B _(n))/B _(n) =c _(n)−1   (33)

Therefore, (32) is constant (independent of n) if, and only if, c_(n) isconstant. Using c to denote the common value of c_(n), we have:

B _(n) =B _(n) ₀ *c ^(n−n) ⁰   (34)

where n₀ is some starting value of n in the range in which the humanperception corresponds to (32). Since V_(n)=n, the equation (34) impliesthat

V _(n) =n ₀+log_(c) (B _(n) /B _(n) ₀ )   (35)

The logarithm can be taken to any base, not necessarily c. Changing thebase corresponds to multiplying the logarithm by some constant. The basecan be any positive number other than 1. Also, the expression (35) canbe multiplied by some constant to scale V_(n) to a desired range (e.g.the range [0,1]). Further, some offset (denoted k₃ in (36) below) can beadded to B_(n)/B_(n) ₀ to avoid computing the logarithm of very smallnumbers. Thus, in some embodiments,

V _(n) =k ₁*log_(b) (k ₂ *B _(n) +k ₃)+k ₄   (36)

where k₁, k₂, k₃, k₄, b are predefined constants. The inversecomputation is given by:

B _(n) =[b ^((V) ^(n) ^(−k) ⁴ ^()/k) ¹ −k ₃ ]/k ₂   (37)

In some embodiments, for n<n₀, a linear scheme is used (like for e andf), for example, V_(n)=B_(n), or:

V _(n) =k ₅ *B _(n) +k ₆   (38)

where k₅, k₆ are predefined constants, and k₅ is not zero. The inversecomputation is:

B _(n)=(V _(n) −k ₆)/k ₅   (39)

In some embodiments, k₆=0.

An appropriate value B_(n) ₀ (the boundary between the linear range (36)and the logarithmic range (35)) can be chosen in different ways. Somestudies indicate that the human visual perception changes from “linear”(when the threshold human ability to see brightness changes ischaracterized by ΔI) to “logarithmic” (when the ability to seebrightness changes is characterized by ΔI/I) at a brightness level atwhich physical adaptation of the eye becomes noticeable (e.g. the irisstarts to constrict). This level is believed to be about 1 cd/m².Different B_(n) ₀ values may be appropriate for different spectralcompositions of the image. (The spectral composition can be defined, forexample, by the radiance P(λ).) The invention is not limited to anyparticular B_(n) ₀ value, or any model of human visual perception, orthe validity of any study referred to herein. The appropriate B_(n) ₀value may also depend on future use of the image. For example, supposethe image is generated by an image capture device, such as aphotographic or movie camera, as the camera takes a picture of a dark,dim scene (e.g. at night). Eventually, after the image processing ofFIGS. 4 and 5, the image will be displayed on a monitor, and in order tosee the image well, the monitor's user will probably have to set themonitor brightness to a large level (using the monitor's brightnesscontrol, e.g. a manual control). Suppose that in order to see the imagewell, the monitor will have to increase the image brightness B by afactor of 1000. In this case, at step 410, it may be desirable to setthe threshold B_(n) ₀ to 1/1000 of the value used for normal lighting,e.g. B_(n) ₀ = 1/1000 cd/m². Conversely, if the image is very bright(e.g. includes the sun), it may be desirable to set B_(n) ₀ to a highvalue if the monitor brightness is likely to be lowered by the user.Some embodiments allow B_(n) ₀ to be set by an operator of the imagecapture device or of a computer performing the step 410.

For illustration, in one embodiment, B_(n) ₀ =1 cd/m². The valuec=128/127, and n₀=127, so:

B _(n) =B ₁₂₇*(128/127)^(n−127) for n≧127,

B _(n) =n*B ₁₂₇/127 for n<127

Hence,

V _(n) =n=log_(b)(B _(n) /B ₁₂₇)/log_(b) (128/127)+127 for B _(n) ₀ ≧B₁₂₇

V _(n)=127*B _(n) /B ₁₂₇ for B _(n) ₀ <B ₁₂₇

Of note, B_(n) is a continuous function of n (including at n=n₀). Insome embodiments, B_(n) is also differentiable, and in particulardifferentiable at n₀. This is equivalent to V being differentiable withrespect to B (unless dB/dn=0). From (36) and (38),

dV/dB=k ₀ =k ₁ *k ₂/(k ₂ *B _(n) ₀ +k ₃)*ln b

The logarithmic expression (36) can also be derived by noting that (32)is equal to

1/B*dB/dV*ΔV=d(ln B)/dV*ΔV

and therefore if ΔV is constant, then for (32) to be constant thefunction ln B must be linear in V.

Thus, in some embodiments, step 410 outputs each of the coordinates V,e, f, in integer format in a predefined number of bits. The number ofbits may be different for different coordinates. If B was in floatingpoint format, the logarithmic expression (36) can be computed infloating point format, and the result converted to integer format.Suitable rounding can be performed, such as rounding up, down, or to thenearest V_(n) value. In some embodiments, B is converted to integerformat before the logarithm computation. In another variation, thecomputer system performing the step 410 determines the values B_(n),B_(n+1) such that B is in an interval with end points B_(n), B_(n+1),e.g. in [B_(i),B_(i+1)) or (B_(i),B_(i+1)]. Once the interval is found,the corresponding V value is set to a predefined value in the interval[V_(n),V_(n+1)], e.g. to V_(n) or V_(n+1) or some midpoint in thisinterval. Other computational schemes, known or to be invented, can alsobe used.

At step 420, a transform is performed which is likely to increase thecompression ratio at step 430 as noted above. An example is the discretewavelet transform (DWT). DWT applies a number of filters (a filter bank)to spacial data (i.e. to data defined for each pixel, such as V, e or f)to hopefully separate components in different frequency bands. Forexample, a bank consisting of a half band highpass filter H and a halfband lowpass filter L can be used. For convenience, let us label thepixels as in FIG. 7, with a pixel (i,j) being in row i and column j.Then a one dimensional DWT can be performed in each row on one or moreof values V, e, f in the row. The explanation below is for the Vcoordinate, but applies equally to the e and f coordinates. It will beassumed for ease of explanation that the V coordinates are arranged in atwo-dimensional memory array labeled as the corresponding pixels in FIG.7, i.e. V(i,j) is the V coordinate at pixel (i,j). An array memorystructure is not necessary, and the invention is not limited to anyparticular data arrangement in the computer memory.

The filters L and H are applied to the V coordinate in each row of thearray, and the results can be stored in the same or another array oranother data structure. In each row, the low frequency coefficients (theL filter output) can be stored in the left half of each row, and thehigh frequency coefficients (the H filter output) in the right half ofeach row, as shown in FIG. 8. The DWT can be performed again on the leftand/or right half of each row. Alternatively, a two-dimensional DWT canbe performed. In this case, after obtaining the structure of FIG. 8, aone-dimensional DWT is performed on each column (FIG. 9). In eachcolumn, the low frequency coefficients (shown as LL for the left half ofthe array of FIG. 8 and as LH for the right half of the array) arestored in the top half of the column, and the high frequencycoefficients (HL for the left half of the array of FIG. 8 and HH for theright half) are stored in the bottom half of each column. The DWT can berepeated on at least the LL part of the structure of FIG. 9, andpossibly on any one or more of the LH, HL, and HH parts, with the sameor different set of filters. Different filter banks can be used for therow-wise and column-wise DWT applications (i.e. the L and H filters usedto obtain the structure of FIG. 9 can be different from those used toobtain the structure of FIG. 8).

In some DWT implementations, the output of the lowpass filter L for eachrow i consists of the even values V(i,2j), i.e. in the matrix of FIG. 8

L(i,j)=V(i,2j), j=0,1, . . . m/2−1

where m is the number of columns in each of the arrays of FIGS. 7-9(these arrays have the same dimensions; in this example, m is even, butthis is not necessary for the invention). The highpass filter H outputsthe difference between the odd-pixel values V(i,2j−1) and a predictedvalue P(i,2j−1) which is computed based on the even-pixel values:

H(i,j)=V(i,2j−m+1)−P(i,2j−m+1), j=m/2, m/2+1, . . . , m−1

In some embodiments, the predictor function P is the mean of the Vvalues at the adjacent even pixels:

P(i,2j−m+1)=(V(i,2j−m)+V(i,2j−m+2))/2

(V is extended in some way at the array boundary so that P(i,m−1) isdefined). In other embodiments, P is a value of a polynomial whichequals to the V values on a number of adjacent even pixels. For example,for a cubic polynomial:

P(i,2j−m+1)=(−V(i,2j−m−2)+9V(i,2j−m)+9V(i,2j−m+2)−V(i,2j−m+3))/16

In some embodiments, different predictors P are used for the same imagedepending on the image properties at a pixel (e.g. depending on whetheror not an object edge is detected near the pixel). See e.g. U.S. Pat.No. 6,941,331 issued Sep. 6, 2005 to Bezryadin et al., incorporatedherein by reference. In some embodiments, the same filters L and H areused for the column DWT (FIG. 9).

Another possible transform for step 420 uses a prediction, at eachpixel, based on the values of one or more preceding pixels, e.g.:

P(i,j)=V(i,j−1),j=1,2, . . . m−1.

The transform outputs the value V(i,0) for the 0-th pixel in each row,and V(i,j)−V(i,j−1) for each subsequent pixel in the row.

Other possible transforms include discrete Fourier transform (DFT),discrete cosine transform (DCT), or others. DFT, DCT, and some othersuitable transforms are described, for example, in William K. Pratt,Digital Image Processing (3^(rd) Ed. 2001), pages 189-210, incorporatedherein by reference.

The techniques described above in connection with FIGS. 4-9 for the Befcoordinate system can be applied to the BCH coordinate system, with thecoordinates C and H processed as described above for e and f. Othercoordinate systems can also be used.

In some embodiments, all the data manipulations can be performed by oneor more computer systems such a system 1010 in FIG. 10. The computersystem may include one or more computer processors 1012, storage 1014(including possibly magnetic, optical, semiconductor, and/or other typesof storage, known or to be invented). If data display is desired, thesystem may include one or more display devices 1016 (e.g. a monitor, aprinter, or some other type, known or to be invented). If a networkconnection is desired, network interface 1017 can be provided. Imagedata and computer programs manipulating the data (such as programs thatperform the methods described above in connection with FIGS. 3-9) can bestored in storage 1014 and/or transmitted over a network.

As described above, some embodiments of the present invention provide amethod comprising: (1) obtaining digital data for one or more imageportions p₁, p₂, . . . (e.g. one or more pixels), wherein for each imageportion p(p=p₁, p₂, . . . ), the digital data represent at least onecoordinate S₁ (e.g. S₁=B) of a color S(p) of the portion p in a firstcoordinate system e.g. Bef or BCH), wherein for a color S havingtristimulus values T₁, T₂, T₃ in a second coordinate system (e.g.tristimulus values DEF): (1A) the coordinate S₁ is defined by a B value

B=√{square root over (g₁₁ T ₁ ² +g ₂₂ T ₂ ² +g ₃₃ T ₃ ² +g ₁₂ T ₁ T ₂ +g₁₃ T ₁ T ₃ +g ₂₃ T ₂ T ₃)}

wherein g₁₁, g₂₂, g₃₃, g₁₂, g₁₃, g₂₃ are predefined constants, and g₁₁,g₂₂, g₃₃ are not equal to zero, or (1B) the coordinate S₁ is defined bythe B value and by a sign of a predefined function of one or more of T₁,T₂, T₃. The B value can be the same as in Bef or BCH, or it can be twicethe value of the B coordinate in Bef, or some other value. The methodfurther comprises: (2) processing the digital data to determine one ormore V-values each of which represents a color property (e.g.brightness) of the corresponding image portion, the processingcomprising, for at least one B value, determining the corresponding Vvalue as in (36). In some embodiments, each V-value is a valuerepresented in integer format.

Some embodiments use a combination of logarithmic coding (36) and someother coding, e.g. linear coding (38), depending on the B coordinate.The logarithmic coding may or may not be used depending on the image;for example, in the embodiment of FIG. 6, if all the B values are belowB_(n) ₀ , then only the linear coding (38) is used. The method comprisesdetermining a range to which the B coordinate belongs, and performing(36) only if the B coordinate is in a predefined proper range (e.g.B_(n) ₀ ≦B<∞).

In some embodiments, the V-values are computed as follows. Given a Bvalue, a B-interval is determined containing the B value. TheB-intervals constitute a predefined first plurality of B-intervals, suchas intervals [B_(n),B_(n)+1) in the logarithmic range n≧n₀ in FIG. 6 (orn>n₀), or intervals (B_(n),B_(n)+1], i.e. including B_(n+1) but notB_(n). Denoting a B-interval's ends as B_(e1), B_(e2) (e.g. B_(e1)=B_(n)and B_(e2)=B_(n+1)), each B-interval is either (B_(e1),B_(e2)), or[B_(e1),B_(e2)), or (B_(e1),B_(e2)], or [B_(e1),B_(e2)]. No two of theseintervals share an internal point, i.e. a point having a neighborhood inboth intervals. In other words, the intersection of any two of theseintervals may be empty or may consist of a single endpoint. Theintervals are such that one or both of the following conditions (1), (2)hold:

(1) for each B-interval in the first plurality of the B-intervals, acorresponding first ratio δ₁=ΔB/B′, where B′ is a selected value in theB-interval, and/or B′=B_(e1) or B′=B_(e2), deviates by at most 30% fromthe first ratios' mean value over the first plurality of theB-intervals, i.e.

0.7δ_(1m)≦δ₁≦1.3δ_(1m)

where δ_(1m) is the mean of δ₁ over the first plurality of theB-intervals;

(2) for each B-interval in the first plurality of the B-intervals, acorresponding second ratio δ₂=B_(e2)/B_(e1) deviates by at most 30% fromthe second ratios' mean value over the first plurality of theB-intervals.

When the B-interval is determined, the corresponding V value isdetermined as one of a predefined plurality of first V-values. Forexample, if the B-interval is [B_(n),B_(n+1)), the corresponding first Vvalue may be V_(n) or some other predefined value in [V_(n),V_(n+1)).Each first V-value is in one of a predefined first plurality ofV-intervals, e.g. intervals [V_(n), V_(n+1)) with n>n₀, or intervals(V_(n),V_(n+1)], or (V_(n),V_(n+1)), or [V_(n), V_(n+1)]. For eachV-interval in the first plurality of the V-intervals, the V-interval'slength ΔV deviates by at most 30% from a mean value of ΔV over the firstplurality of the V-intervals.

The maximum deviation values can be other than 30% for the B-intervalsand/or for the V-intervals, for example, 20%, 10%, 5%, and other valuesare suitable. In particular, any values of 30% and below are suitable.The deviation values do not have to be the same for the B-intervals andthe V-intervals.

Some embodiments use different pluralities of intervals in differentranges of B, e.g. for logarithmic and linear coding respectively. Forexample, for the linear coding, the B-intervals are such that the lengthΔB deviates by at most 30% from a mean value of ΔB over the secondplurality of the B-intervals. Also, the length ΔV deviates by at most30% from a mean value of ΔV over the second plurality of theV-intervals. The length ΔV does not have to be the same for n<n₀ and forn>n₀.

In some embodiments, the logarithmic coding range does not include allthe B_(n) values with n>n₀. The logarithmic coding range may be, forexample, just 10% of the range [0,B_(max)] where B_(max) is some maximumvalue for which the processing of FIG. 4 or 5 is performed, or themaximum of the B values in the image. In other portions of the rangen>n₀, some other coding is performed, which may be non-logarithmic, ormay be logarithmic but with some other parameters k₁ through k₄ and b.Thus, different parameters can be used in different ranges. Also, thelogarithmic coding range may be just 10% of the range [B_(n) ₀,B_(max)], while non-logarithmic coding or logarithmic coding withdifferent parameters can be performed elsewhere. In these cases, the 10%figure is exemplary, and other percentages are possible, including anylarger percentages.

In some embodiments, the logarithmic coding range for the V-values doesnot include all of [V_(n) ₀ ,V_(max)]. The logarithmic coding range maybe just 10% of the range [0,V_(max)] or [V_(n) ₀ ,V_(max)], whereV_(max) is some maximum value for which the processing of FIG. 4 or 5 isperformed, or the maximum of the V values in the image. For example, thenumber of points B_(n) or V_(n) in the logarithmic coding range can bejust 10% of the total number of points B_(n) or V_(n), or the totalnumber of such points in the range n>n₀ or n≧n₀. Here V_(max) is somemaximum V value for which the processing of FIG. 4 or 5 is performed, orthe maximum of the V values in the image. In other portions of the range[0,V_(max)] or [V_(n) ₀ ,V_(max)], non-logarithmic coding is performed,or logarithmic coding is performed with different parameters. The 10%figure is exemplary, and other percentages are possible, including anylarger percentages.

The same range choices apply to the exponential coding (37), as theinvention includes determining the B values from the V values.

The invention is not limited to the two-dimensional images (as in FIG.7). The invention is applicable to pixel (bitmap) images and to vectorgraphics. Colors can be specified separately for each pixel, or a colorcan be specified for an entire object or some other image portion. Theinvention is applicable to monochromatic images, in which the chromaticcoordinates (such as e, f or C, H) are not specified or are the same forall the pixels. Other embodiments and variations are within the scope ofthe invention, as defined by the appended claims.

Appendix 1—Function arctg(a,b)

Here is a pseudocode written in a C-like language (C is a programminglanguage). inline float arctg(const float a, const float b)

{  float res;  if( FLT_EPSILON * abs(b) < abs(a) )    //FLT_EPSILON isthe minimum positive number ε    // such that 1-ε is different from 1 onthe computer.    //abs( ) is the absolute value  {   res = tan⁻¹ (b / a);   if (a < 0)   {    res += π ;   }   else if (b < 0)   {    res += 2 π;   };  }  else  {   if(b < 0)   {    res = 3/2 π ;   }   else   {    if(b > 0)    {     res = ½ π ;    }    else    {     res = 0 ;    };   }; };  return res ; } ;

1. A circuitry-implemented method for image processing, the methodcomprising: (1) obtaining digital data for one or more image portionsp₁, p₂, . . . , wherein for each image portion p(p=p₁, p₂, . . . ), thedigital data represent at least one coordinate S₁ of a color S(p) of theportion p in a first coordinate system, wherein for a color S havingtristimulus values T₁, T₂, T₃ in a second coordinate system: (1A) thecoordinate S₁ is defined by a B valueB=√{square root over (g₁₁ T ₁ ² +g ₂₂ T ₂ ² +g ₃₃ T ₃ ² +g ₁₂ T ₁ T ₂ +g₁₃ T ₁ T ₃ +g ₂₃ T ₂ T ₃)} wherein g₁₁, g₂₂, g₃₃, g₁₂, g₁₃, g₂₃ arepredefined constants, and g₁₁, g₂₂, g₃₃ are not equal to zero, or (1B)the coordinate S₁ is defined by the B value and by a sign of apredefined function of one or more of T₁, T₂, T₃; (2) processing thedigital data to determine one or more V-values each of which representsa color property of the corresponding image portion, the processingcomprising, for at least one B value, determining the corresponding Vvalue as V=k₁+k₂*log_(b) (k₃B+k₄), wherein k₁, k₂, k₃, k₄, b arepredefined constants, k₂ and k₃ are not zero, and b is positive and notequal to one.
 2. The method of claim 1 wherein each V-value is a valuerepresented in integer format.
 3. A circuitry-implemented method forimage processing, the method comprising: (1) obtaining digital datarepresenting a V value for each of one or more image portions p₁, p₂, .. . , each V value representing a color property of the respective imageportion, wherein each image portion p(p=p₁, p₂, . . . ) has a color S(p)having a coordinate S₁ in a first coordinate system, wherein for a colorS having tristimulus values T₁, T₂, T₃ in a second coordinate system:(1A) the coordinate S₁ is defined by a B valueB=√{square root over (g₁₁ T ₁ ² +g ₂₂ T ₂ ² +g ₃₃ T ₃ ² +g ₁₂ T ₁ T ₂ +g₁₃ T ₁ T ₃ +g ₂₃ T ₂ T ₃)} wherein g₁₁, g₂₂, g₃₃, g₁₂, g₁₃, g₂₃ arepredefined constants, and g₁₁, g₂₂, g₃₃ are not equal to zero, or (1B)the coordinate S₁ is defined by the B value and by a sign of apredefined function of one or more of T₁, T₂, T₃; (2) processing thedigital data to obtain the coordinate S₁ for each said image portion,wherein for each V value in a first range of values, the correspondingcoordinate S₁ corresponds to the B value of:B=[b ^((V−k) ⁴ ^()/k) ¹ −k ₃ ]/k ₂ wherein k₁, k₂, k₃, k₄, b arepredefined constants, k₂ and k₃ are not zero, and b is positive and notequal to one.
 4. A circuitry-implemented method for image processing,the method comprising: (1) obtaining digital data for one or more imageportions p₁, p₂, . . . , wherein for each image portion p (p=p₁, p₂, . .. ), the digital data represent at least one coordinate S₁ of a colorS(p) of the portion p in a first coordinate system, wherein for a colorS having tristimulus values T₁, T₂, T₃ in a second coordinate system:(1A) the coordinate S₁ is defined by a B valueB=√{square root over (g₁₁ T ₁ ² +g ₂₂ T ₂ ² +g ₃₃ T ₃ ² +g ₁₂ T ₁ T ₂ +g₁₃ T ₁ T ₃ +g ₂₃ T ₂ T ₃)} wherein g₁₁, g₂₂, g₃₃, g₁₂, g₁₃, g₂₃ arepredefined constants, and g₁₁, g₂₂, g₃₃ are not equal to zero, or (1B)the coordinate S₁ is defined by the B value and by a sign of apredefined function of one or more of T₁, T₂, T₃; (2) processing thedigital data to determine one or more V-values each of which representsa color property of the corresponding image portion, the processingcomprising, for at least one B-value: (2A) determining a range to whichthe at least one B value belongs, the range being one of a predefinedplurality of ranges; (2B) if the at least on B value is in a first rangewhich is one of said ranges, then determining the corresponding V valueas V=k₁+k₂*log (k₃B+k₄), wherein k₁, k₂, k₃, k₄, b are predefinedconstants, k₂ and k₃ are not zero, and b is positive and not equal toone.
 5. The method of claim 4 wherein the first range has a length equalto at least 10% of a combined length of all the ranges.
 6. The method ofclaim 4 further comprising, for each image portion p for which thecorresponding B value is not in the first range but is in a second rangewhich is one of said ranges and which contains values which are smallerthan values in the first range, determining the corresponding V value asV=k₅B+k₆, wherein k₅, k₆ are predefined constants, and k₅ is not zero.7. The method of claim 6 wherein the first range has a length equal toat least 10% of a combined length of all the ranges other than thesecond range.
 8. The method of claim 4 wherein V is represented ininteger format.
 9. A circuitry-implemented method for image processing,the method comprising: (1) obtaining digital data containing a V valuefor each of one or more image portions p₁, p₂, . . . , each V valuerepresenting a color property of the respective image portion, whereineach image portion p (p=p₁, p₂, . . . ) has a color S(p) have acoordinate S₁ in a first coordinate system, wherein for a color S havingtristimulus values T₁, T₂, T₃ in a second coordinate system: (1A) thecoordinate S₁ is defined by a B valueB=√{square root over (g₁₁ T ₁ ² +g ₂₂ T ₂ ² +g ₃₃ T ₃ ² +g ₁₂ T ₁ T ₂ +g₁₃ T ₁ T ₃ +g ₂₃ T ₂ T ₃)} wherein g₁₁, g₂₂, g₃₃, g₁₂, g₁₃, g₂₃ arepredefined constants, and g₁₁, g₂₂, g₃₃ are not equal to zero, or (1B)the coordinate S₁ is defined by the B value and by a sign of apredefined function of one or more of T₁, T₂, T₃; (2) processing thedigital data to obtain the coordinate S₁ for each said image portion,wherein the processing comprises, for at least one image portion,determining a range to which the corresponding V value belongs, therange being one of a predefined plurality of ranges, and if the V valueis in a first range which is one of said ranges, then obtaining thecorresponding coordinate S₁ for which the corresponding B value is:B=[b ^((V−k) ⁴ ^()/k) ¹ −k ₃ ]k ₂ wherein k₁, k₂, k₃, k₄, b arepredefined constants, k₂ and k₃ are not zero, and b is positive and notequal to one.
 10. The method of claim 9 wherein the first range has alength equal to at least 10% of a combined length of all the ranges. 11.The method of claim 9 wherein the method comprises, if the V value isnot in the first range but is in a second range which is one of saidranges and which contains values which are smaller than values in thefirst range, obtaining the coordinate S₁ for which the corresponding Bvalue is:B=(V−k ₆)/k ₅ where k₅, k₆ are predefined constants, and k₅ is not zero.12. The method of claim 11 wherein the first range has a length equal toat least 10% of a combined length of all the ranges other than thesecond range.
 13. A circuitry-implemented method for image processing,the method comprising: (1) obtaining digital data for one or more imageportions p₁, p₂, . . . , wherein for each image portion p(p=p₁, p₂, . .. ), the digital data represent at least one coordinate S₁ of a colorS(p) of the portion p in a first coordinate system, wherein for a colorS having tristimulus values T₁, T₂, T₃ in a second coordinate system:(1A) the coordinate S₁ is defined by a B valueB=√{square root over (g₁₁ T ₁ ² +g ₂₂ T ₂ ² +g ₃₃ T ₃ ² +g ₁₂ T ₁ T ₂ +g₁₃ T ₁ T ₃ +g ₂₃ T ₂ T ₃)} wherein g₁₁, g₂₂, g₃₃, g₁₂, g₁₃, g₂₃ arepredefined constants, and g₁₁, g₂₂, g₃₃ are not equal to zero, or (1B)the coordinate S₁ is defined by the B value and by a sign of apredefined function of one or more of T₁, T₂, T₃; (2) processing thedigital data to obtain V-values each of which represents a colorproperty of the corresponding image portion, the processing comprising,for at least one B value: (2A) determining a B-interval containing the Bvalue, the B-interval being an interval in one of a predefined firstplurality of B-intervals, wherein no two B-intervals share an internalpoint, each B-interval being associated with the B-interval's endsB_(e1), B_(e2), each B-interval thus being one of (B_(e1),B_(e2)),[B_(e1),B_(e2)), (B_(e1),B_(e2)], [B_(e1),B_(e2)], wherein one or bothof the following conditions (2A-1), (2A-2) hold: (2A-1) for eachB-interval in the first plurality of the B-intervals, a correspondingfirst ratio δ₁=ΔB/B′, where B′ is a selected value in the B-interval,and/or B′=B_(e1) or B′=B_(e2), deviates by at most 30% from the firstratios' mean value over the first plurality of the B-intervals; (2A-2)for each B-interval in the first plurality of the B-intervals, acorresponding second ratio δ₂=B_(e2)/B_(e1) deviates by at most 30% fromthe second ratios' mean value over the first plurality of theB-intervals; (2B) determining a V value corresponding to the at leastone B value, the V value being one of a predefined plurality of firstV-values each of which corresponds to one of the B-intervals, each firstV-value being in one of a predefined first plurality of V-intervalswhich are intervals no two of which share an internal point, and foreach V-interval in the first plurality of the V-intervals, theV-interval's length ΔV deviates by at most 30% from a mean value of ΔVover the first plurality of the V-intervals.
 14. A circuitry-implementedmethod for image processing, the method comprising: (1) obtainingdigital data representing a V value for each of one or more imageportions p₁, p₂, . . . , each V value representing a color property ofthe respective image portion, wherein each image portion p(p=p₁, p₂, . .. ) has a color S(p) having a coordinate S₁ in a first coordinatesystem, wherein for a color S having tristimulus values T₁, T₂, T₃ in asecond coordinate system: (1A) the coordinate S₁ is defined by a B valueB=√{square root over (g₁₁ T ₁ ² +g ₂₂ T ₂ ² +g ₃₃ T ₃ ² +g ₁₂ T ₁ T ₂ +g₁₃ T ₁ T ₃ +g ₂₃ T ₂ T ₃)} wherein g₁₁, g₂₂, g₃₃, g₁₂, g₁₃, g₂₃ arepredefined constants, and g₁₁, g₂₂, g₃₃ are not equal to zero, or (1B)the coordinate S₁ is defined by the B value and by a sign of apredefined function of one or more of T₁, T₂, T₃; (2) processing thedigital data to obtain the coordinate S₁ for each said image portion;wherein at least one V-value belongs to a predefined plurality of firstV-values each of which is in one of a predefined first plurality ofV-intervals which are intervals no two of which share an internal point,and for each V-interval in the first plurality of the V-intervals, theV-interval's length ΔV deviates by at most 30% from a mean value of ΔVover the first plurality of the V-intervals; wherein each of the firstV-values corresponds to a B value in a predefined first plurality ofB-values each of which belongs to one of a predefined first plurality ofB-intervals which are intervals no two of which share an internal point,each B-interval being associated with the B-interval's ends B_(e1),B_(e2), each B-interval thus being one of (B_(e1),B_(e2)),[B_(e1),B_(e2)), (B_(e1),B_(e2)], [B_(e1),B_(e2)], wherein one or bothof the following conditions (2A-1), (2A-2) hold: (2A-1) for eachB-interval in the first plurality of the B-intervals, a correspondingfirst ratio δ₁=ΔB/B′, where B′ is a selected value in the B-interval,and/or B′=B_(e1) or B′=B_(e2), deviates by at most 30% from the firstratios' mean value over the first plurality of the B-intervals; (2A-2)for each B-interval in the first plurality of the B-intervals, acorresponding second ratio δ₂=B_(e2)/B_(e1) deviates by at most 30% fromthe second ratios' mean value over the first plurality of theB-intervals.
 15. A circuitry-implemented method for image processing,the method comprising: (1) obtaining digital data for one or more imageportions p₁, p₂, . . . , wherein for each image portion p(p=p₁, p₂, . .. ), the digital data represent at least one coordinate S₁ of a colorS(p) of the portion p in a first coordinate system, wherein for a colorS having tristimulus values T₁, T₂, T₃ in a second coordinate system:(1A) the coordinate S₁ is defined by a B valueB=√{square root over (g₁₁ T ₁ ² +g ₂₂ T ₂ ² +g ₃₃ T ₃ ² +g ₁₂ T ₁ T ₂ +g₁₃ T ₁ T ₃ +g ₂₃ T ₂ T ₃)} wherein g₁₁, g₂₂, g₃₃, g₁₂, g₁₃, g₂₃ arepredefined constants, and g₁₁, g₂₂, g₃₃ are not equal to zero, or (1B)the coordinate S₁ is defined by the B value and by a sign of apredefined function of one or more of T₁, T₂, T₃; (2) processing thedigital data to obtain V-values each of which represents a colorproperty of the corresponding image portion, the processing comprising,for at least one B value, determining a range to which the at least oneB value belongs, the range being one of a predefined plurality ofranges, and if the at least one B value is in a first range which is oneof said ranges, then: (2A) determining a B-interval containing the Bvalue, the B-interval being an interval in one of a predefined firstplurality of B-intervals no two of which share an internal point, eachB-interval being associated with the B-interval's ends B_(e1), B_(e2),each B-interval thus being one of (B_(e1),B_(e2)), [B_(e1),B_(e2)),(B_(e1),B_(e2)], [B_(e1),B_(e2)], wherein one or both of the followingconditions (2A-1), (2A-2) hold: (2A-1) for each B-interval in the firstplurality of the B-intervals, a corresponding first ratio δ₁=ΔB/B′,where B′ is a selected value in the B-interval, and/or B′=B_(e1) orB′=B_(e2), deviates by at most 30% from the first ratios' mean valueover the first plurality of the B-intervals; (2A-2) for each B-intervalin the first plurality of the B-intervals, a corresponding second ratioδ₂=B_(e2)/B_(e1) deviates by at most 30% from the second ratios' meanvalue over the first plurality of the B-intervals; (2B) determining a Vvalue corresponding to the at least one B value, the V value being oneof a predefined plurality of first V-values, each first V-value being inone of a predefined first plurality of V-intervals which are intervalsno two of which share an internal point, and for each V-interval in thefirst plurality of the V-intervals, the V-interval's length ΔV deviatesby at most 30% from a mean value of ΔV over the first plurality of theV-intervals.
 16. The method of claim 15 wherein the first range has alength equal to at least 10% of a combined length of all the ranges. 17.The method of claim 15 wherein the processing comprises, if the at leastone B value is not in the first range but is in a second range which isone of said ranges and which contains values smaller than values in thefirst range: (2C) determining a B-interval containing the B value, theB-interval being an interval in one of a predefined second plurality ofB-intervals which are intervals such that no two B-intervals of thefirst and second pluralities of the B-intervals share an internal point,wherein a length ΔB of each B-interval in the second plurality of theB-intervals deviates by at most 30% from a mean value of ΔB over thesecond plurality of the B-intervals; (2D) determining a V valuecorresponding to the at least one B value, the V value being one of apredefined plurality of second V-values, each second V-value being inone of a predefined second plurality of V-intervals which are intervalssuch that no two V-intervals of the first and second pluralities sharean internal point, wherein a length ΔV of each V-interval in the secondplurality of the ν-intervals deviates by at most 30% from a mean valueof ΔV over the second plurality of the V-intervals.
 18. The method ofclaim 17 wherein the first range has a length equal to at least 10% of acombined length of all the ranges other than the second range.
 19. Acircuitry-implemented method for image processing, the methodcomprising: (1) obtaining digital data representing a V value for eachof one or more image portions p₁, p₂, . . . , each V value representinga color property of the respective image portion, wherein each imageportion p(p=p₁, p₂, . . . ) has a color S(p) having a coordinate S₁ in afirst coordinate system, wherein for a color S having tristimulus valuesT₁, T₂, T₃ in a second coordinate system: (1A) the coordinate S₁ isdefined by a B valueB=√{square root over (g₁₁ T ₁ ² +g ₂₂ T ₂ ² +g ₃₃ T ₃ ² +g ₁₂ T ₁ T ₂ +g₁₃ T ₁ T ₃ +g ₂₃ T ₂ T ₃)} wherein g₁₁, g₂₂, g₃₃, g₁₂, g₁₃, g₂₃ arepredefined constants, and g₁₁, g₂₂, g₃₃ are not equal to zero, or (1B)the coordinate S₁ is defined by the B value and by a sign of apredefined function of one or more of T₁, T₂, T₃; (2) processing thedigital data to obtain the coordinate S₁ for each said image portion,wherein the processing comprises, for at least one V-value, determininga range to which the at least one V value belongs, the range being oneof a predefined plurality of ranges, and if the at least one V-value isin a first range which is one of said ranges, then obtaining thecorresponding coordinate S₁ for which the corresponding B value is in apredefined first plurality of B values each of which belongs to one of apredefined first plurality of B-intervals, the B-intervals of the firstplurality being intervals such that no two B-intervals share an internalpoint, each B-interval being associated with the B-interval's endsB_(e1), B_(e2), each B-interval thus being one of (B_(e1),B_(e2)),[B_(e1),B_(e2)), (B_(e1),B_(e2)], [B_(e1),B_(e2)], wherein one or bothof the following conditions (2A-1), (2A-2) hold: (2A-1) for eachB-interval in the first plurality of the B-intervals, a correspondingfirst ratio δ₁=ΔB/B′, where B′ is a selected value in the B-interval,and/or B′=B_(e1) or B′=B_(e2), deviates by at most 30% from the firstratios' mean value over the first plurality of the B-intervals; (2A-2)for each B-interval in the first plurality of the B-intervals, acorresponding second ratio δ₂=B_(e2)/B_(e1) deviates by at most 30% fromthe second ratios' mean value over the first plurality of theB-intervals; wherein each V value in the first range belongs to one of apredefined first plurality of V-intervals, the V-intervals beingintervals no two of which share an internal point, and for eachV-interval in the first plurality of the V-intervals, the V-interval'slength ΔV deviates by at most 30% from a mean value of ΔV over the firstplurality of the V-intervals.
 20. The method of claim 19 wherein thefirst range has a length equal to at least 10% of a combined length ofall the ranges.
 21. The method of claim 19 wherein the method comprises,if the at least one V-value is not in the first range but is in a secondrange which is one of said ranges and which has values smaller thanvalues in the first range, obtaining the corresponding coordinate S₁ forwhich the corresponding B value is in a predefined second plurality ofB-values each of which belongs to one of a predefined second pluralityof B-intervals, the B-intervals of the second plurality being intervalssuch that no two B-intervals of the first and second pluralities of theB-intervals share an internal point, and for each B-interval in thesecond plurality of the B-intervals, the B-interval's length ΔB deviatesby at most 30% from a mean value of ΔB over the second plurality of theB-intervals; wherein each V value in the second range belongs to one ofa predefined second plurality of V-intervals which are intervals suchthat no two V-intervals of the first and second pluralities of theV-intervals share an internal point, and for each V-interval in thesecond plurality of the V-intervals, the V-interval's length ΔV deviatesby at most 30% from a mean value of ΔV over the second plurality of theV-intervals.
 22. The method of claim 21 wherein the first range has alength equal to at least 10% of a combined length of all the rangesother than the second range.
 23. A computer-readable medium comprisingdigital data representing one or more V values each of which representsa color property of a respective one of one or more image portions p₁,p₂, . . . , wherein each image portion p(p=p₁, p₂, . . . ) has a colorS(p) whose tristimulus values T₁, T₂, T₃ in a predefined colorcoordinate system are such that the corresponding B value isB=√{square root over (g₁₁ T ₁ ² +g ₂₂ T ₂ ² +g ₃₃ T ₃ ² +g ₁₂ T ₁ T ₂ +g₁₃ T ₁ T ₃ +g ₂₃ T ₂ T ₃)} wherein g₁₁, g₂₂, g₃₃, g₁₂, g₁₃, g₂₃ arepredefined constants, and g_(11, g) ₂₂, g₃₃ are not equal to zero,wherein for each image portion having a B value in a first range, thecorresponding V value is:V=k ₁ +k ₂*log_(b) (k ₃ B+k ₄) wherein k₁, k₂, k₃, k₄, b are predefinedconstants, k₂ and k₃ are not zero, and b is positive and not equal toone.
 24. The computer readable medium of claim 23 wherein for each imageportion having a B value in a second range but not in the first range,the second range having values smaller than values in the first range,the corresponding V value is V=k₅B+k₆, wherein k₅, k₆ are predefinedconstants, and k₅ is not zero.
 25. The method of claim 24 wherein thefirst range has a length equal to at least 10% of a combined length ofthe first and second ranges.
 26. The computer readable medium of claim24 wherein each V value is represented in integer format.
 27. Acomputer-readable medium comprising digital data representing one ormore V values each of which represents a color property of a respectiveone of one or more image portions p₁, p₂, . . . , wherein each imageportion p(p=p₁, p₂, . . . ) has a color S(p) whose tristimulus valuesT₁, T₂, T₃ in a predefined color coordinate system are such that thecorresponding B value isB=√{square root over (g₁₁ T ₁ ² +g ₂₂ T ₂ ² +g ₃₃ T ₃ ² +g ₁₂ T ₁ T ₂ +g₁₃ T ₁ T ₃ +g ₂₃ T ₂ T ₃)} wherein g₁₁, g₂₂, g₃₃, g₁₂, g₁₃, g₂₃ arepredefined constants, and g₁₁, g₂₂, g₃₃ are not equal to zero, wherein:(A) each B value lies in a B-interval which is one of a predefined firstplurality of B-intervals which are intervals no two of which share aninternal point, each B-interval being associated with the B-interval'sends B_(e1), B_(e2), each B-interval thus being one of (B_(e1),B_(e2)),[B_(e1),B_(e2)), (B_(e1),B_(e2)], [B_(e1),B_(e2)], wherein one or bothof the following conditions (A-1), (A-2) hold: (A-1) for each B-intervalin the first plurality of the B-intervals, a corresponding first ratioδ₁=ΔB/B′, where B′ is a selected value in the B-interval, and/orB′=B_(e1) or B′=B_(e2), deviates by at most 30% from the first ratios'mean value over the first plurality of the B-intervals; (A-2) for eachB-interval in the first plurality of the B-intervals, a correspondingsecond ratio δ₂=B_(e2)/B_(e1) deviates by at most 30% from the secondratios' mean value over the first plurality of the B-intervals; (B) eachV value corresponds to a respective B value and is one of a predefinedplurality of first V-values, each first V-value being in one of apredefined first plurality of V-intervals which are intervals no two ofwhich share an internal point, and for each V-interval in the firstplurality of the V-intervals, the V-interval's length ΔV deviates by atmost 30% from a mean value of ΔV over the first plurality of theV-intervals.
 28. Circuitry adapted to perform the method of claim
 1. 29.A computer readable medium comprising one or more computer instructionsfor causing a computer system to perform the method of claim
 1. 30. Anetwork transmission method comprising transmitting over a network acomputer program for performing the method of claim
 1. 31. Circuitryadapted to perform the method of claim
 3. 32. A computer readable mediumcomprising one or more computer instructions for causing a computersystem to perform the method of claim
 3. 33. A network transmissionmethod comprising transmitting over a network a computer program forperforming the method of claim
 3. 34. Circuitry adapted to perform themethod of claim
 4. 35. A computer readable medium comprising one or morecomputer instructions for causing a computer system to perform themethod of claim
 4. 36. A network transmission method comprisingtransmitting over a network a computer program for performing the methodof claim
 4. 37. Circuitry adapted to perform the method of claim
 9. 38.A computer readable medium comprising one or more computer instructionsfor causing a computer system to perform the method of claim
 9. 39. Anetwork transmission method comprising transmitting over a network acomputer program for performing the method of claim
 9. 40. Circuitryadapted to perform the method of claim
 13. 41. A computer readablemedium comprising one or more computer instructions for causing acomputer system to perform the method of claim
 13. 42. A networktransmission method comprising transmitting over a network a computerprogram for performing the method of claim
 13. 43. Circuitry adapted toperform the method of claim
 14. 44. A computer readable mediumcomprising one or more computer instructions for causing a computersystem to perform the method of claim
 14. 45. A network transmissionmethod comprising transmitting over a network a computer program forperforming the method of claim
 14. 46. Circuitry adapted to perform themethod of claim
 15. 47. A computer readable medium comprising one ormore computer instructions for causing a computer system to perform themethod of claim
 15. 48. A network transmission method comprisingtransmitting over a network a computer program for performing the methodof claim
 15. 49. Circuitry adapted to perform the method of claim 19.50. A computer readable medium comprising one or more computerinstructions for causing a computer system to perform the method ofclaim
 19. 51. A network transmission method comprising transmitting overa network a computer program for performing the method of claim
 19. 52.A network transmission method comprising transmitting over a networkdigital data representing one or more V values each of which representsa color property of a respective one of one or more image portions p₁,p₂, . . . , wherein each image portion p(p=p₁, p₂, . . . ) has a colorS(p) whose tristimulus values T₁, T₂, T₃ in a predefined colorcoordinate system are such that the corresponding B value isB=√{square root over (g₁₁ T ₁ ² +g ₂₂ T ₂ ² +g ₃₃ T ₃ ² +g ₁₂ T ₁ T ₂ +g₁₃ T ₁ T ₃ +g ₂₃ T ₂ T ₃)} wherein g₁₁, g₂₂, g₃₃, g₁₂, g₁₃, g₂₃ arepredefined constants, and g₁₁, g₂₂, g₃₃ are not equal to zero, whereinfor each image portion having a B value in a first range, thecorresponding V value is:V=k ₁ +k ₂*log_(b) (k ₃ B+k ₄) wherein k₁, k₂, k₃, k₄, b are predefinedconstants, k₂ and k₃ are not zero, and b is positive and not equal toone.
 53. The method of claim 52 wherein for each image portion having aB value in a second range but not in the first range, the second rangehaving values smaller than values in the first range, the correspondingV value is V=k₅B+k₆, wherein k₅, k₆ are predefined constants, and k₅ isnot zero.
 54. The method of claim 53 wherein the first range has alength equal to at least 10% of a combined length of the first andsecond ranges.
 55. The method of claim 53 wherein each V value isrepresented in integer format.
 56. A network transmission methodcomprising transmitting over a network digital data representing one ormore V values each of which represents a color property of a respectiveone of one or more image portions p₁, p₂, . . . , wherein each imageportion p(p=p₁, p₂, . . . ) has a color S(p) whose tristimulus valuesT₁, T₂, T₃ in a predefined color coordinate system are such that thecorresponding B value isB=√{square root over (g₁₁ T ₁ ² +g ₂₂ T ₂ ² +g ₃₃ T ₃ ² +g ₁₂ T ₁ T ₂ +g₁₃ t ₁ T ₃ +g ₂₃ T ₂ T ₃)} wherein g₁₁, g₂₂, g₃₃, g₁₂, g₁₃, g₂₃ arepredefined constants, and g₁₁, g₂₂, g₃₃ are not equal to zero, wherein:(A) each B value lies in a B-interval which is one of a predefined firstplurality of B-intervals which are intervals no two of which share aninternal point, each B-interval being associated with the B-interval'sends B_(e1), B_(e2), each B-interval thus being one of (B_(e1),B_(e2)),[B_(e1),B_(e2)), (B_(e1),B_(e2)], [B_(e1),B_(e2)], wherein one or bothof the following conditions (A-1), (A-2) hold: (A-1) for each B-intervalin the first plurality of the B-intervals, a corresponding first ratioδ₁=ΔB/B′, where B′ is a selected value in the B-interval, and/orB′=B_(e1) or B′=B_(e2), deviates by at most 30% from the first ratios'mean value over the first plurality of the B-intervals; (A-2) for eachB-interval in the first plurality of the B-intervals, a correspondingsecond ratio δ₂=B_(e2)/B_(e1) deviates by at most 30% from the secondratios' mean value over the first plurality of the B-intervals; (B) eachV value corresponds to a respective B value and is one of a predefinedplurality of first V-values, each first V-value being in one of apredefined first plurality of V-intervals which are intervals no two ofwhich share an internal point, and for each V-interval in the firstplurality of the V-intervals, the V-interval's length ΔV deviates by atmost 30% from a mean value of ΔV over the first plurality of theV-intervals.